﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Configuration;

namespace WebSite.Admin
{
    public partial class AdminLogin : System.Web.UI.Page
    {
        protected void Page_Load( object sender, EventArgs e )
        {

        }

        protected void Button1_Click( object sender, EventArgs e )
        {
            if (string.Compare( tbUserID.Text, ConfigurationManager.AppSettings["AdminUser"], true ) == 0
                && string.Compare( tbUserID.Text, ConfigurationManager.AppSettings["AdminUser"], true ) == 0)
            {
                Session["AdminUser"] = tbUserID.Text;
                Response.Redirect( "frame.aspx" );
            }
            else
            {
                ClientScript.RegisterStartupScript( this.GetType(), "error", "alert('用户名或密码错误');", true );
            }
            
//    <add key="AdminUser" value="admin"/>
    //<add key="AdminPwd" value="1!2@3#4$"/>

        }
    }
}